<!DOCTYPE html>
<html>
		<head>
		<meta charset="UTF-8">
			<meta name="viewport" content="width=device-width, initial-scale=1.0">
	        <link rel="stylesheet" href="css/nav.css">
	        <link rel="stylesheet" href="bootstrap-3.3.5/css/bootstrap.css">
		    <title>添加管理员信息</title>
			<link href="css/index.css" rel="stylesheet" type="text/css" /> 
			<script type="text/javascript" src="js/jquery.1.4.2-min.js"></script>
			<script type="text/javascript" src="js/Calculation.js"></script>
			<style>
				form{
					text-align: center;
					border: 0px;
					margin: auto;
					width: 300px;
					height: 500px;
					margin-top: 100px;
					font-family: "微软雅黑";
					font-size: 17px;
				}
		#send{margin: auto;font-size: 18px;}
			</style>
</head>
	<body>
		<form>
			管理员 号: <input type="text" id="adminid" value="" /><hr>
			管理员密码:<input type="password" id="adminpassword" value=""/><hr>
		           管理员姓名: <input type="text" id="adminname" value=""/><hr>
			         <p><input value="提交" type="button" id="send"/></p>
	    </form>
	    
	<script type="text/javascript">
	   $('form input[type=button]').on('click',function(){  
            $.ajax({  
                type: 'POST',  
                url: '/admins',  
                data: {  
                    adminid: $('form input[type=text]').val(),  
                    adminpassword: $('form input[type=password]').val(), 
                    adminname: $('form input[type=text]').val()  
                }, 
                error : function() {
                alert('请求失败 ');
                 },
                 success:function() {
                alert('添加成功 ');
                 },
             });
         });
		    
	</script>
	
		
	</body>
</html>
